package cn.itsource.service.impl;

import cn.itsource.domain.Log;
import cn.itsource.mapper.LogMapper;
import cn.itsource.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private LogMapper logMapper;

    //查询所有
    @Override
    public List<Log> findAll() {
        return logMapper.findAll();
    }

    //日志需要添加的功能
    @Override
    public void add(Log log) {
        logMapper.add(log);
    }

    //根据id查询
    @Override
    public Log findOne(int id) {
        return logMapper.findOne(id);
    }

    //根据id删除数据
    @Override
    public void delete(int id) {
        logMapper.delete(id);
    }
}
